/*
 *  Copyright 2002 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/*
 *  ======== irotate.h ========
 *  IDIFF Interface Header
 */
#ifndef IDIFF_
#define IDIFF_

#include <ialg.h>

#ifdef __cplusplus
extern "C" {
#endif

#define DIFFTHRESHOLD 	50
#define YTHRESHOLD		15
#define CRCBTHRESHOLD	0

/*
 *  ======== IDIFF_Handle ========
 *  This handle is used to reference all DIFF instance objects
 */
typedef struct IDIFF_Obj *IDIFF_Handle;

/*
 *  ======== IDIFF_Obj ========
 *  This structure must be the first field of all DIFF instance objects
 */
typedef struct IDIFF_Obj {
    struct IDIFF_Fxns *fxns;    
} IDIFF_Obj;

/*
 *  ======== IDIFF_Params ========
 *  This structure defines the creation parameters for all DIFF objects
 */
typedef struct IDIFF_Params {
    Int  size;          /* must be first field of all params structures */
} IDIFF_Params;

/*
 *  ======== IDIFF_PARAMS ========
 *  Default parameter values for DIFF instance objects
 */
extern IDIFF_Params IDIFF_PARAMS;

/*
 *  ======== IDIFF_Fxns ========
 *  This structure defines all of the operations on DIFF objects
 */
typedef struct IDIFF_Fxns {
    IALG_Fxns   ialg;    /* IDIFF extends IALG */
    Void (*apply)(IDIFF_Handle handle, unsigned char y[], 
                  unsigned char cr[], unsigned char cb[], 
                  unsigned char prevY[], unsigned char prevCr[], 
                  unsigned char prevCb[], Int lumaSize, Int chromaSize,
                  Int yValue, Int crValue, Int cbValue, Int procWidth);
} IDIFF_Fxns;

#ifdef __cplusplus
}
#endif /* extern "C" */

#endif  /* IDIFF_ */


